const baseUrl = "http://118.178.254.102/harryserver/"

const requestGetUserOrder = (data) => uni.request({url:baseUrl + "order/user_order",method:"GET",data:data})
const requestNewOrder = (data) => uni.request({url:baseUrl + "order/new_order",method:"POST",data:data,header: {"content-type":"application/x-www-form-urlencoded"}})
const requestRegister = (data) => uni.request({url:baseUrl + "user/register",method:"GET",data:data})
const requestLogin = (data) => uni.request({url:baseUrl + "user/login",method:"GET",data:data})
const requestGetInfo = (data) => uni.request({url:baseUrl + "user/get_info",method:"GET",data:data})
const requestSetInfo = (data) => uni.request({url:baseUrl + "user/set_info", method:"GET",data:data})
const requestChangePassword = (data) => uni.request({url:baseUrl + "user/change_password",method:"GET",data:data})
const requestAllWares = () => uni.request({url:baseUrl + "wares/all_wares",method:"GET"})
const requestNewSale = (data) => uni.request({url:baseUrl + "wares/new_sale", method:"POST", data:data, header: {"content-type":"application/x-www-form-urlencoded"}})

export {
    requestGetUserOrder,
    requestNewOrder,
    requestRegister,
    requestLogin,
    requestGetInfo,
    requestSetInfo,
    requestChangePassword,
    requestAllWares,
    requestNewSale
}
